class Animal:
    def __init__(self, name, age):
        self.name = name
        self.age = age

    def eat(self):
        print(f'{self.name}正在吃东西')

    def drink(self):
        print(f'{self.name}正在喝水')


animal = Animal('大黄', 5)


class Dog(Animal):
    def guard(self):
        print(f'{self.name}正在看门')


dog = Dog('大白', 6)
print(dog)
print(dog.name, dog.age)
dog.eat()
dog.drink()
dog.guard()
